/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 导航样式 */
nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: #6a11cb;
    color: white;
}

.search-box {
    display: flex;
    margin-top: 0.5rem;
}

#search-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 200px;
}

#search-btn {
    padding: 0.5rem 1rem;
    background-color: #6a11cb;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 主内容区样式 */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-left: 4px solid #6a11cb;
    padding-left: 0.75rem;
}

/* 日期选择器 */
#date-selector {
    margin-bottom: 2rem;
}

#note-date {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* 笔记网格布局 */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.note-card h3 {
    color: #6a11cb;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.note-content {
    margin-bottom: 1rem;
}

.note-content ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 0.75rem;
}

.rating {
    font-weight: 500;
}

/* 科目分类样式 */
.subjects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.subject {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.subject:hover {
    background-color: #6a11cb;
    color: white;
}

/* 学习资源样式 */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.resource-card h3 {
    color: #6a11cb;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.resource-card ul {
    padding-left: 1.5rem;
}

.resource-card li {
    margin-bottom: 0.5rem;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links {
        margin-bottom: 1rem;
        width: 100%;
        justify-content: space-around;
    }
    
    .search-box {
        width: 100%;
    }
    
    #search-input {
        flex-grow: 1;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-links a {
        display: block;
        text-align: center;
    }
}